import request from '@/utils/request'

/**
 * 分页
 * @param query
 */
export function pagingGoodsList(query) {
  return request({
    url: '/goods/projectTaobaoGoods/paging',
    method: 'get',
    params: query
  })
}

/**
 * 保存
 * @param query
 */
export function saveGoods(query) {
  return request({
    url: '/goods/projectTaobaoGoods/save',
    method: 'post',
    params: query
  })
}
/**
 * 加入/移除 供货联盟
 * @param query
 */
export function saveIsJoinSupply(query) {
  return request({
    url: '/goods/projectTaobaoGoods/saveIsJoinSupply',
    method: 'post',
    data: query
  })
}
/**
 * 获取详情
 * @param query
 */
export function getTaobaoGoodsDetail(itemId, enterpriseId) {
  return request({
    url: '/goods/projectTaobaoGoods/getTaobaoGoodsDetail',
    method: 'get',
    params: { itemId: itemId, enterpriseId: enterpriseId }
  })
}
/**
 * 获取详情
 * @param query
 */
export function saveJoinProjectGoods(itemId, enterpriseId) {
  return request({
    url: '/goods/projectTaobaoGoods/saveJoinProjectGoods',
    method: 'post',
    params: { itemId: itemId, enterpriseId: enterpriseId }
  })
}
